<?php 
    require_once('includes/general.php');
    if(!tep_db_checkDb()) die('ko ket noi dc csdl');
    $sql1="SELECT * FROM tbl_tin_tuc ORDER BY id DESC limit 3";
                                    $kq1=tep_db_query($sql1);
                                    
                                    $arr=array();
                                    while($item1=tep_db_fetch_array($kq1)){
                                        array_push($arr,$item1);
                                    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> Angel life </title><!--

<meta property="og:title" content="Smith hails 'unique' Wable legacy" /> 
<meta property="og:description" content="John Smith claims beautiful football 
            is the main legacy of Akhil Wable's decade at the club. " /> 

            
-->
<meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Lang" content="en"/>
<meta name="author" content=""/>
<meta http-equiv="Reply-to" content="@.com"/>
<meta name="generator" content="PhpED 5.8"/>
<meta name="description" content="thien nhien xanh"/>
<meta name="keywords" content=" thien nhien xanh"/>
<meta name="creation-date" content="01/01/2009"/>
<meta name="revisit-after" content="15 days"/>




<link rel="stylesheet" type="text/css" href="css/reset.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="css/gioithieustyle.css"/>
<link rel="stylesheet" type="text/css" href="css/jcarouselcircle.css"/>

<link rel="stylesheet" type="text/css" href="css/global.css"/>

<link rel="stylesheet" type="text/css" href="css/list-rotator.css" title="default" />
<link rel="stylesheet" type="text/css" href="css/rotator.css" title="default" />
<link rel="stylesheet" type="text/css" href="css/squeezebox.css" title="default" />
<link rel="stylesheet" type="text/css" href="css/sanpham.css" title="default" />
<!--
moi them vao ngay 30/9
-->



    <script type="text/javascript"></script>
    <link href="css/menustyle.css" rel="stylesheet" type="text/css" />
<!--ket thuc 30/9-->

<script type="text/javascript" src="js/mootools-1.2-core-nc.js"></script>
<script type="text/javascript" src="js/squeezebox.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
    window.addEvent('domready', function() {
        /**
        * That CSS selector will find all <a> elements with the
        * attribute rel="boxed"
        *
        * The second argument sets additional options.
        */
        SqueezeBox.assign($$('a[rel=boxed]'), {
            size: {x: 720, y: 520},
            ajaxOptions: {
            method: 'get' // we use GET for requesting plain HTML (you can skip it, it is the default value)
            }
        });
        SqueezeBox.assign($$('a[rel=lienhe]'), {
            size: {x: 720, y: 520},
            ajaxOptions: {
            method: 'get' // we use GET for requesting plain HTML (you can skip it, it is the default value)
            }
        });
    });
/* ]]> */
</script> 
<script type="text/javascript" src="js/jquery-1.6.4.js"></script>
<script type="text/javascript"> jQuery.noConflict();</script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/jquery.jcarousel.min.js"></script>
<script type="text/javascript" src="js/slides.min.jquery.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.min.js"></script>
<script type="text/javascript" src="js/jquery.list-rotator.min.js"></script>

<script type="text/javascript" src="js/myscript.js"></script>
    
<script type="text/javascript" src="js/sanphamscript.js"></script>
<script type="text/javascript" src="js/list_rotator.js"></script>

<script type="text/javascript" src="js/checksearch.js"></script>
<!--[if IE 6]>
<style>
#nav{
position: absolute;
top: expression(0+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px');
left: expression(0+((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft)+'px');
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
button { width:auto; overflow:visible; }
button span {
margin-top: 0;
}
</style>
<![endif]-->
<!--[if lt IE 7]>
<script defer type="text/javascript" src="admin/templates/library/pngfix.js"></script>
<![endif]--> 

</head>
<body>
  <div id="wap">
    <!--Header-->
    
        <div id="header">
            <a class="logo" href="index.php">
                <img src="images/logo.png" alt=""/>
            </a>
            <!--search-->
         
            <div id="slogan" >
              
                <marquee height="25" sscrollAmount="1" direction="left" loop="true" scrolldelay="160" onMouseOver="this.stop()" onMouseOut="this.start()">
                        <h2>Dinh dưỡng hợp lý là nền tảng cho sức khỏe</h2>
                </marquee>
            </div>
            <div id="search">
                 <!--
<form   name="form" action="search.php" method="get">
                    <input type="text" id="timkiem" class="timkiem" name="q" />
                    <input type="submit" name="Submit" value="Search"/>
                 </form>
-->
                   
                     <form name="search" method="post" action="index.php?type=search">
                     Tìm kiếm <input type="text" name="find" />                      
                     <input type="hidden" name="searching" value="yes" />
                     <input type="submit" name="btnSearch" value="Search" />
                     </form>
                
             </div>
             <!--menu header-->
            <!--
<div class="clear"></div>
-->
            <div id="menu_header">
                <ul id="primary_menu"  >
                    <li >
                        <a href="index.php" >Trang chủ</a>
                     </li>
                    <li >
                        <a href="<?php echo '?page=sanpham'?>">Sản phẩm</a>
                         <ul>
                                <li>
                                    <a href="<?php echo '?page=gioithieusanpham'?>">Giới Thiệu Sản Phẩm</a>
                                </li>
                                <?php
                                    $sql='select * from tbl_danh_muc_san_pham';
                                    $kq=tep_db_query($sql);
                                    while($item=tep_db_fetch_array($kq)){ ?>
                                    <li>
                                        <a href="<?php echo '?page=sanpham&amp;madanhmucsanpham='.$item['id'].''?>"><?php echo ''.$item['ten_danh_muc'].'' ?> </a>
                                    </li>
                                <?php }?>
                            </ul>   
                    </li>
                    <li >
                        <a href="<?php echo '?page=thuvien'?>">Thư viện Spirulina</a>
                    </li>
                    <li >
                        <a href="<?php echo '?page=lamdepvasuckhoe'?>">Làm đẹp và sức khỏe</a>
                         <ul>
                                <li>
                                    <a href="<?php echo '?page=lamdep'?>">Mục làm đẹp</a>
                                </li>
                                
                                <li>
                                    <a href="<?php echo '?page=suckhoe' ?>"> Mục sức khỏe</a>
                                </li>
                                
                            </ul>   
                    </li>
                    <li >
                        <a href="<?php echo '?page=angellife' ?> " >Về Công Ty</a>
                    </li>   
                    <li >
                        <a id="lienhe" rel="lienhe" href="lienhe.php">Liên hệ</a>
                    </li>                       
                </ul>
            </div>
        </div>
        <!--ket thuc header-->
        <!--bat dau Content-->
        <div id="content">
            <?php
                $show = false;
                if(isset($_GET['page']) && $_GET['page']=='sanpham'){
                    $show=true;
                    require_once('sanpham.php');
                } else if(isset($_GET['page']) && $_GET['page']=='angellife'){
                    require_once('angellife.php');
                } else if(isset($_GET['page']) && $_GET['page']=='tintuc'){
                    require_once('tintuc.php');
                } else if(isset($_GET['page']) && $_GET['page']=='thuvien'){
                    require_once('thuvien.php');
                } else if(isset($_GET['matintuc']) ){
                    require_once('chitiettintuc.php');
                } else if(isset($_GET['page']) && $_GET['page']=='chitietsanpham'){
                    require_once('chitietsanpham.php');
                } else if(isset($_GET['page']) && $_GET['page']=='gioithieusanpham'){
                    require_once('gioithieusanpham.php');
                } else if(isset($_GET['page']) && $_GET['page']=='timkiem'){
                    require_once('timkiem.php');
                } else if(isset($_GET['page']) && $_GET['page']=='lamdepvasuckhoe'){
                    require_once('lamdepvasuckhoe.php');
                } else if(isset($_GET['page']) && $_GET['page']=='lamdep'){
                    require_once('lamdep.php');
                }else if(isset($_GET['page']) && $_GET['page']=='suckhoe'){
                    require_once('suckhoe.php');
                }else if(isset($_GET['type']) && $_GET['type']=='search'){
                    $show=true;
                    require_once('timkiem.php');
                }else if(isset($_GET['page']) && $_GET['page']=='chitietsanpham' &&$_GET["masanpham"]){
                    require_once('chitietsanpham.php');
                }
                else{
                    
               
            ?>
            <div id="gioithieu">
                <!-- script -->
              
                <div class="container">
                        <div class="l-rotator">
                
                            <div class="screen">
                            	<noscript><img src="images/rotator/rotator/hk.jpg" alt=""/></noscript>
                          	</div>
                            <div class="thumbnails">
                                <ul>
                                    <li>
                                        <div class="thumb">
                                            <img src="images/rotator/thumbs/bg1.jpg" alt=""/>                
                                      </div>
                                        <a href="images/rotator/bg1.jpg"></a>
                                        
                                        <a href="index.php?matintuc=<?php echo $arr[0]['id']?>&amp;maloaitintuc=<?php echo $arr[0]['ma_danh_muc_tin_tuc']?>"></a>                        
                                        <div style="top:290px; left:374px; width:550px;height: 150px">
                                            <h1><?php echo $arr[0]['tieu_de']?></h1>
                                            <?php echo $arr[0]['mo_ta_ngan_gon'] ?>
                                        </div> 
                                    </li>
                
                                    <li>
                                        <div class="thumb">
                                            <img src="images/rotator/thumbs/bg2.jpg" alt=""/>
                                            
                                      </div>
                                        <a href="images/rotator/bg2.jpg"></a>
                                        <a href="index.php?matintuc=<?php echo $arr[1]['id']?>&amp;maloaitintuc=<?php echo $arr[1]['ma_danh_muc_tin_tuc']?>"></a>
                                       <div style="top:290px; left:374px; width:550px;height: 150px">
                
                                            <h1><?php echo $arr[1]['tieu_de']?></h1>
                                            <?php echo $arr[1]['mo_ta_ngan_gon'] ?>
                                        </div>
                                    </li>
                                    <li>                    
                                        <div class="thumb">
                                            <img src="images/rotator/thumbs/bg6.jpg" alt=""/>
                                            
                                      </div>                              
                                        <a href="images/rotator/bg6.jpg"></a>
                
                                        <a href="index.php?matintuc=<?php echo $arr[2]['id']?>&amp;maloaitintuc=<?php echo $arr[2]['ma_danh_muc_tin_tuc']?>"></a>
                                        <div style="top:290px; left:374px; width:550px;height: 150px">
                                            <h1><?php echo $arr[2]['tieu_de']?></h1>
                                            <?php echo $arr[2]['mo_ta_ngan_gon'] ?>
                                        </div>
                                    </li>
                                   <?php   
                                        $sql2="SELECT * FROM tbl_san_pham ORDER BY id DESC limit 1";
                                        $kq2=tep_db_query($sql2);
                                        $item2=tep_db_fetch_array($kq2);    
                                    ?>
                                    <li>
                                        <div class="thumb">
                                            <img src="images/rotator/thumbs/bg7.jpg" alt=""/>
                
                                            
                                      </div> 
                                        <a href="images/rotator/bg7.jpg"></a>   
                                        <a href="index.php?page=sanpham"></a>
                                        <div style="top:290px; left:374px; width:550px;height: 150px">
                                            <h1><?php echo $item2['ten_san_pham']?></h1>
                                            <?php echo $item2['mo_ta_ngan_gon'] ?>    
                                        </div>  
                                    </li>
                                   <?php
                                        $sql3="SELECT * FROM tbl_thu_vien ORDER BY id DESC limit 1";
                                        $kq3=tep_db_query($sql3);
                                        $item3=tep_db_fetch_array($kq3);
                                    ?>
                                    <li>
                                        <div class="thumb">
                                            <img src="images/rotator/thumbs/bg8.jpg" alt=""/>
                                            
                                      </div>
                                        <a href="images/rotator/bg8.jpg"></a>
                                       <a href="index.php?page=thuvien"></a>
                                        <div style="top:290px; left:374px; width:550px;height: 150px">
                 
                                            <h1><?php echo $item3['tieu_de'] ?></h1>
                                            Lorem ipsum elitr fastidii pro et, quo no idque option efficiantur. 
                                            Has id amet legimus vocibus, ius choro scribentur no. Autem facer eripuit cu mea. Vim an malorum qualisque vituperata.                        </div>                                                                                                 	
                                    </li>
                                    <li>
                                        <div class="thumb">
                                            <img src="images/rotator/thumbs/bg9.jpg" alt=""/>
                                            
                                      </div>
                                        <a href="images/rotator/bg9.jpg"></a>
                                       <a href="index.php?page=thuvien"></a>
                                        <div style="top:290px; left:374px; width:550px;height: 150px">
                 
                                            <h1><?php echo $item3['tieu_de'] ?></h1>
                                            Lorem ipsum elitr fastidii pro et, quo no idque option efficiantur. 
                                            Has id amet legimus vocibus, ius choro scribentur no. Autem facer eripuit cu mea. Vim an malorum qualisque vituperata.                        </div>                                                                                                 	
                                    </li>                                       
                             	</ul>
                        	</div>     
                		</div>     	
                  	</div>
                   <!--end  script -->
                
            </div>            
            <?php  } ?>
            <!-- bat dau san pham noi bat -->
            <?php 
            if(!$show){
            ?>
                <div id="sanphamnoibat" class="jcarousel-skin-tango">
                       
                        <!-- script -->
                                   
                     
    					<ul id="mycarousel">
                            <?php
                                $sql='select * from tbl_san_pham';
                                $kq=tep_db_query($sql);
                                while($item=tep_db_fetch_array($kq)){ ?>
                               
                                    <li><div class="block">
                                        <a href="index.php?page=chitietsanpham&masanpham=<?php echo $item['id']?>&madanhmuc=<?php echo $item['ma_danh_muc']?>&mode=detail"><img src="<?php echo 'images/'.$item['hinh_anh'].''?>" alt="<?php echo $item['hinh_anh'].''?>"  /></a>
        								    <a href="index.php?page=chitietsanpham&masanpham=<?php echo $item['id']?>&madanhmuc=<?php echo $item['ma_danh_muc']?>&mode=detail">	<h3><?php  echo ''.$item['ten_san_pham'].''?></h3></a>
        									
  
                                        </div>
                                    </li>
                             <?php       
                                } 
                            ?>
    															
    						</ul>
    						<div id="wrapper">
    								<div id="image"></div>
    							<div id="thumbnails">
    								<div id="slideleft" title="Slide Left"></div>
    								<div id="slidearea">
    									<div id="slider"></div>
    								</div>
    								<div id="slideright" title="Slide Right"></div>
    							</div>
    						</div>
    
                       <!-- end script -->
                       
                </div>
            <?php } ?>
            <div class="clear"></div>
        </div>
        <!--Footer-->
        <div id="footers">
            <div id="footer-top">
                <div id="danhmucsanpham_footer" class="danhmuc">
                    <h2>Danh mục sản phẩm</h2>
                     <ul>
                    <?php
                        $sql3='select * from tbl_danh_muc_san_pham';
                        $kq3=tep_db_query($sql3);
                        while($item=tep_db_fetch_array($kq3)){
                            echo '<li><a href="?page=sanpham&amp;madanhmucsanpham='.$item['id'].'">'.$item['ten_danh_muc'].'</a></li>';
                        } 
                     ?>
                       
                    </ul>
                </div>
                
                <div class="danhmuc">
                    <h2>Tin tức nổi bật</h2>
                    <ul>
                        <?php
                        $sql3='select * from tbl_tin_tuc order by id desc limit 4';
                        $kq3=tep_db_query($sql3);
                        while($item=tep_db_fetch_array($kq3)){
                            echo '<li><a href="index.php?matintuc='.$item['id'].'&amp;maloaitintuc='.$item['ma_danh_muc_tin_tuc'].'">'.$item['tieu_de'].'</a></li>';
                        } 
                     ?>
                    </ul>
                </div>
                <div id="dathang">
                    <!--
<input type="button" value="Ð?t hàng" />
-->
                    <a id="linkdathang" rel="boxed" href="dathang.php">dag hang</a>
                    
                </div>
            </div>
            <div id="footer-bottom">
                <div style="float: left;width: 350px;">
                    <h2>CÔNG TY TNHH THIÊN THẦN CUỘC SỐNG</h2>
                    770C Sư Vạn Hạnh,P.12,Q.10,Tp.HCM,Việt Nam<br/>
                    Điện Thoại: 84-8-38634737 <br />  Hot line: 1800 545 484<br />
                    Fax: 84-8-38634738
                    
                </div>    
                    <div style="float: right;width: 200px; margin-top:50px">
                        <a name="fb_share" type="button" share_url="<?php echo urlencode("http://angellife.com.vn/Service.aspx?ctype=A") ?>"></a> 
                        <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 
                                type="text/javascript">
                        </script>
                        
                        <a id="lienhe" rel="lienhe" href="lienhe.php">Liên hệ</a>
                    </div>
            </div>
        </div>
  </div>
 
</body>
</html>